<script setup lang="ts">
const userCookie = useCookie("user");
const tokenCookie = useCookie("token");
const msg = useState<string>("msg");

const handleCancel = () => {
  window.history.back();
};

const handleOk = () => {
  userCookie.value = "";
  tokenCookie.value = "";
  msg.value = "注销成功";
  navigateTo("/");
};
</script>

<template>
  <ClientOnly>
    <Confirm @cancel="handleCancel" @ok="handleOk">确定退出？</Confirm>
  </ClientOnly>
</template>
